﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<brjostagjof.Models.User>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">

        Breyta notanda upplýsingum
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Breyta upplýsingum um mig</h2>

     <% using (Html.BeginForm("EditMyProfile", "MySite", FormMethod.Post, new { enctype = "multipart/form-data" }))
       {%>
        <%: Html.ValidationSummary(true) %>
        
        <fieldset>
            <div class="editor-label">
                Nafn
            </div>
             <div class="editor-field">
                <%: Html.TextBoxFor(model => model.name)%>
                <%: Html.ValidationMessageFor(model => model.name)%>
            </div>
            
            <div class="editor-label">
                Velja Mynd
            </div>
            <div class="editor-field">
                <input type="file" name="files" id="file1" size="25"  />  
            </div>

            <div class="editor-label">
                Netfang
            </div>
             <div class="editor-field">
                <%: Html.TextBoxFor(model => model.email)%>
                <%: Html.ValidationMessageFor(model => model.email)%>
            </div>
            <div class="editor-label">
                Aldur
            </div>

             <div class="editor-field">
                <%: Html.TextBoxFor(model => model.age)%>
                <%: Html.ValidationMessageFor(model => model.age)%>
            </div>

            <div class="editor-label">
                Heimilisfang
            </div>
             <div class="editor-field">
                <%: Html.TextBoxFor(model => model.address)%>
                <%: Html.ValidationMessageFor(model => model.address)%>
            </div>

            <div class="editor-label">
                Póstnúmer
            </div>
             <div class="editor-field">
                <%: Html.TextBoxFor(model => model.zipCode)%>
                <%: Html.ValidationMessageFor(model => model.zipCode)%>
            </div>

             <div class="editor-label">
                Um mig
            </div>
             <div class="editor-field">
                <%: Html.TextAreaFor(model => model.description, new { rows = "10", cols = "40" })%>
                <%: Html.ValidationMessageFor(model => model.description) %>
            </div>

           
          <div class="edit">
                <%= Html.HiddenFor(model => model.ID) %>
          </div>
            <p>
                <input type="submit" value="Staðfesta" />
            </p>

         </fieldset>

    <% } %>

    <div>
        <%: Html.ActionLink("Hætta við", "Index") %>
    </div>

</asp:Content>
